$(document).ready(function(){
	
	var setting = {
			check : {
				enable : true
			},
			data : {
				simpleData : {
					enable : true
				}
			}
		};

	var zNodes = [
        <c:forEach items="${data}" var="o">
            { id:${o.id}, pId:${o.pId}, name:"${o.name}"},
        </c:forEach>	              
			];
	
	alert(zNodes);

	$.fn.zTree.init($("#tree"), setting, zNodes);
	setting.check.chkboxType = { "Y" : "ps", "N" : "ps" };
	$("#py").bind("change", setCheck);
	$("#sy").bind("change", setCheck);
	$("#pn").bind("change", setCheck);
	$("#sn").bind("change", setCheck);
});







